Utility type guard for validating finite numeric values.
function isFiniteNumber(value: unknown): value is number;
Note: this function is defined and exported from
utilities/helpers.ts, but it is not re-exported from the package's top-levelindex.ts. It is not currently reachable asimport { isFiniteNumber } from "@fluex/fluexgl-dsp"— it is used internally bycoerceFiniteNumber(). Documented here for completeness.
The isFiniteNumber() function is a small utility helper that checks whether a given value is a finite JavaScript number.
It performs two validations:
numberNaN, Infinity, or -Infinity)Because it is implemented as a TypeScript type guard, this function also provides compile-time narrowing when used in conditional statements.
This helper is commonly used for validating DSP parameters and preventing unstable numeric values from propagating into audio processing logic.
value: unknown – The value to be validated.boolean –
true if the value is a finite numberfalse otherwiseWhen returning true, TypeScript will narrow value to type number.
This function does not emit any errors or warnings.